package com.headFirstModel.factoryPattern.methodFactory.ny;

import com.headFirstModel.factoryPattern.methodFactory.Pizza;
import com.headFirstModel.factoryPattern.methodFactory.PizzaSotre;

/**
 * 纽约的一家披萨加盟店
 */
public class NYStylePizzaStore extends PizzaSotre{
    @Override
    protected Pizza createPizza(String type) {
        Pizza pizza=null;
       if(type.equals("veggie")){
           pizza=new NYVeggiePizza();
       }if(type.equals("peppernoi")){
           pizza=new NYPeppernoiPizza();
        }
       return pizza;
    }
}
